<template>
    <div>
        <el-button variant="outline-primary" @click="open">打开对话框</el-button>
        <el-alert show variant="success" v-show="show">
            <el-button variant="outline-primary" @click="close">关闭</el-button>
            <h4 class="alert-heading">成功!</h4>
            <p>
                这是一个弹出框！！
            </p>
            <hr>
            <p class="mb-0">
                弹出框内容！！
            </p>
        </el-alert>
    </div>
</template>

<script>
    export default {
        name: "home",
        data(){
            return{
                'show':false
            }
        },
        methods:{
            open:function () {
                this.show=true
            },
            close:function () {
                this.show=false
            }
        }
    }
</script>

<style scoped>

</style>
